Skip to content

Conversation

matkomat
Copy link

@matkomat matkomat commented Sep 15, 2022

This removes PHP 8.1 deprecations for jsonSerialize return type.

e.g.

PHP Deprecated:  Return type of ChromeDevtoolsProtocol\Model\Page\NavigateRequest::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /projet/vendor/jakubkulhan/chrome-devtools-protocol/gen-src/ChromeDevtoolsProtocol/Model/Page/NavigateRequest.php on line 76

This adds attribute ReturnTypeWillChange which is a recommendation for projects needing backwards compatibility with PHP 7. Once this project stops supporting PHP 7 you could replace the $jsonSerialize->addAttribute('ReturnTypeWillChange'); with $jsonSerialize->setReturnType('mixed');.

@matkomat matkomat marked this pull request as ready for review September 15, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant